From 9c93581566ac66f00af870aeb11aef53dee4d39c Mon Sep 17 00:00:00 2001 From: justbur Date: Fri, 29 Jan 2016 20:41:15 -0500 Subject: [PATCH] Interpret ESC in operator popup See #99 --- which-key.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index 3b8927d05c2..37370764f4a 100644 --- a/which-key.el +++ b/which-key.el @@ -1947,8 +1947,12 @@ is selected interactively by mode in `minor-mode-map-alist'." (let* ((key (key-description (list (read-key))))) (cond ((and which-key-use-C-h-commands (string= "C-h" key)) (which-key-C-h-dispatch)) - (t (setq unread-command-events (listify-key-sequence key)) - (which-key--hide-popup)))))) + ((string= key "ESC") + (which-key--hide-popup) + (keyboard-quit)) + (t + (which-key--hide-popup) + (setq unread-command-events (listify-key-sequence key))))))) (defun which-key--create-buffer-and-show (&optional prefix-keys) "Fill `which-key--buffer' with key descriptions and reformat. -- 2.30.2